package com.metacube.metaconnect.Service;

import java.util.ArrayList;

import com.metacube.metaconnect.model.CommentDAO;

public class CommentsService {

	private CommentDAO commentDAO;

	public CommentsService() {
		commentDAO = new CommentDAO();
	}

	public boolean insertComment(String email, int post_id, String comment) {
		return commentDAO.insertComment(email, post_id, comment);
	}

	public ArrayList getAllComments(String post_id) {
		return commentDAO.getAllComments(post_id);
	}

	public boolean deleteComment(int comment_id) {
		return commentDAO.deleteComment(comment_id);
	}

	public int getTotalComments(String post_id) {
		return commentDAO.getTotalComments(post_id);
	}
}
